package me.ywy.opengltest.view;

import android.content.Context;
import android.opengl.GLSurfaceView;
import android.util.AttributeSet;

/**
 * Created by ywy on 2018-10-31.
 */
public class DouyinView extends GLSurfaceView {
    public DouyinView(Context context) {
        this(context , null);
    }

    public DouyinView(Context context, AttributeSet attrs) {
        super(context, attrs);
        //配置EGL版本
        setEGLContextClientVersion(2);
        setRenderer(new DouyinRenderer(this));
        //设置按需渲染requestRender() 就是请求去渲染
        setRenderMode(RENDERMODE_WHEN_DIRTY);
    }
}
